package com.hhkj.admin.question.service.biz.impl;

import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.hhkj.admin.question.domain.ProblemFeedback;
import com.hhkj.admin.question.model.dopo.ProblemFeedbackDo;
import com.hhkj.admin.question.model.dopo.ProblemFeedbackPo;
import com.hhkj.admin.question.model.req.ProblemFeedbackReq;
import com.hhkj.admin.question.model.res.ProblemFeedbackRes;
import com.hhkj.admin.question.service.base.ProblemFeedbackService;
import com.hhkj.admin.question.service.biz.ProblemFeedbackBizService;
import com.hhkj.admin.question.service.extend.ProblemFeedbackExtendService;
import com.ruoyi.common.base.biz.service.biz.BaseBizServiceImpl;
import org.springframework.stereotype.Service;

/**
 * ProblemFeedbackBizServiceImpl
 *
 * @author SERVER
 * @since 2024/3/28 9:44
 */
@Service
public class ProblemFeedbackBizServiceImpl
        extends BaseBizServiceImpl<ProblemFeedback, ProblemFeedbackReq, ProblemFeedbackRes, ProblemFeedbackDo, ProblemFeedbackPo, ProblemFeedbackService, ProblemFeedbackExtendService>
        implements ProblemFeedbackBizService {
    @Override
    public boolean handlerProblemFeedback(ProblemFeedbackReq req) {
        LambdaUpdateWrapper<ProblemFeedback> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
        lambdaUpdateWrapper.eq(ProblemFeedback::getId, req.getId());
        lambdaUpdateWrapper.set(ProblemFeedback::getAdoptFlag, req.getAdoptFlag());
        lambdaUpdateWrapper.set(ProblemFeedback::getRemark, req.getRemark());
        lambdaUpdateWrapper.set(ProblemFeedback::getResolveTime, req.getResolveTime());
        return this.getService().update(lambdaUpdateWrapper);
    }
}